<template>
  <button @click="man">man</button>
  <button @click="woman">woman</button>

</template>
<script>
import { defineComponent, reactive, toRefs } from 'vue'
import router from '../../router/index'
export default defineComponent({
  setup() {
    const state=reactive({

    })
    const man=()=>{
      window.localStorage.setItem("sex","man")
      router.push("/home")
    }
    const woman=()=>{
      window.localStorage.setItem("sex","woman")
      router.push("/home")
    }
    return {
      ...toRefs(state),
      man,
      woman
    }
  },
})
</script>
